package com.heima.article.job;


import com.heima.article.service.ApArticleService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@Slf4j
public class HotArticleToRedis {

    @Autowired
    private ApArticleService apArticleService;

    @XxlJob("hotarticlehandler")
    public void handler(){
        apArticleService.findArticleListBy5day();
        log.info("计算成功!!"+new Date());
    }

}
